#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import django
from utils.encrypt import md5
# set django environment
# # add current dir to sys path 
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
print(base_dir)
sys.path.append(base_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tracer.settings")

# run setup environment, 导入tracer.settings
django.setup() # os.environ['DJANGO_SETTINGS_MODULE']

from web import models
# 往数据库添加数据：链接数据库、操作、关闭链接
models.UserInfo.objects.create(username='dpp', email='chengshuo@live.com',
mobile_phone='13838383838', password='1111')